package com.sec.etech.employeesync.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sec.etech.employeesync.entity.OrgEmployee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author : 齐马的作品
 * @version : 1.0
 * @date : 2024/8/22 15:45
 * @description:
 */
public interface OrgEmployeeMapper extends BaseMapper<OrgEmployee> {

    @Select("SELECT e.* FROM org_employee e " +
            "LEFT JOIN org_employee_z_company c ON e.company_id = c.company_id " +
            "WHERE c.code_ = #{companyCode}")
    List<OrgEmployee> queryEmployeeByCompany(@Param("companyCode") String companyCode);
}
